package org.vidyakiran.app.server.dao.util;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class EntityManagerFactoryInstance {

	private static final EntityManagerFactory emfInstance =
        Persistence.createEntityManagerFactory("transactions-optional");

    private EntityManagerFactoryInstance() {}

    public static EntityManagerFactory get() {
        return emfInstance;
    }
    
    public static EntityManager getManager() {
    	return emfInstance.createEntityManager();
    }
}
